Set up¶

In [1]:
set.seed(2021)
suppressMessages(library(ArchR))
addArchRThreads(threads = 16)

s <- function(x, pattern, slot = 1, ...) { 
  sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
Warning message:
“package ‘ArchR’ was built under R version 4.1.2”
Setting default number of Parallel threads to 16.

In [2]:
markerGenePlot <- function(proj, genes ) {
    p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                       name = genes, embedding = "UMAPH230", imputeWeights = NULL)
    
    p3 <- lapply(p, function(x){
        x + guides(color = 'none', fill = 'none') + 
        theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) + 
        theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
              axis.text.y=element_blank(),  axis.ticks.y=element_blank())
    })
    do.call(cowplot::plot_grid, c(list(ncol = 3),p3))
}


options(stringsAsFactors = F)
options(repr.plot.width=11, repr.plot.height=8.5)
In [3]:
# path to archr project
ARCHDIR = '/projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_MJL'
PROJDIR = '/projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data'

### load rheMac10 ArchR genome ###
GENOMEDIR = '/home/bnphan/resources/genomes/rheMac10'
load(file.path(GENOMEDIR,'rheMac10_liftoff_GRCh38.p13_ArchR_annotations.rda'))
proj = loadArchRProject(ARCHDIR)

# Get names of available genes
genes <- getFeatures(
  ArchRProj = proj,
  useMatrix = "GeneScoreMatrix",
  select = NULL,
  ignoreCase = TRUE
)
Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

In [4]:
proj
table(proj$Celltype1)
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

class: ArchRProject 
outputDirectory: /projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_MJL 
samples(5): DH-1_SEA1346A1 DH-3_SEA1346A3 DH-4_SEA1346A4 DH-5_SEA1346A5
  DH-2_SEA1346A2
sampleColData names(1): ArrowFiles
cellColData names(26): Sample TSSEnrichment ... ClustersI230
  ClustersH230
numberOfCells(1): 43829
medianTSS(1): 24.36
medianFrags(1): 12627
< table of extent 0 >
In [5]:
## make UMAP plots
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "ClustersH230", embedding = "UMAPH230")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2bae0bcbdc-Date-2022-04-11_Time-12-28-04.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 
WARNING: Error found with Cairo installation. Continuing without rasterization.

Length of unique values greater than palette, interpolating..



ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2bae0bcbdc-Date-2022-04-11_Time-12-28-04.log

In [6]:
p1
In [7]:
# Andreas's final categories of neuron subtypes

# mac2mmfamD = {};
# mac2mmfamD['GLUT1'] = 'Ex-Reln';
# mac2mmfamD['GLUT2'] = 'Ex-Reln';
# mac2mmfamD['GLUT3'] = 'Ex-Sox5';
# mac2mmfamD['GLUT4'] = 'Ex-Sox5';
# mac2mmfamD['GLUT5'] = 'Ex-Sox5';
# mac2mmfamD['GLUT6'] = 'Ex-Sox5';
# mac2mmfamD['GLUT7'] = 'Ex-Maf';
# mac2mmfamD['GLUT8'] = 'Ex-Cpne3';
# mac2mmfamD['GLUT9'] = 'Ex-Prkcg';
# mac2mmfamD['GLUT10'] = 'Ex-Prkcg';
# mac2mmfamD['GLUT11'] = 'Ex-Rreb1';


# mac2mmfamD['GABA1'] = 'Inh-Cdh3';
# mac2mmfamD['GABA2_1'] = 'Inh-Rorb';
# mac2mmfamD['GABA2_2'] = 'Inh-Adamts5';
# mac2mmfamD['GABA3'] = 'Inh-Npy';
# mac2mmfamD['GABA4_1'] = 'Inh-Rorb';
# mac2mmfamD['GABA4_2'] = 'Inh-Adamts5';
# mac2mmfamD['GABA5'] = 'Inh-Pdyn';

# mac2mmfamD['midVen'] = 'midVent';

Excitatory Neurons¶

In [8]:
### Using Andreas's gene choices, visualize clusters based on gene expression
### How I found gene names: genes[startsWith(genes,'MAF')] <- example
### Excitatory neurons
markEx = c('RELN','SOX5','MAF', 'CPNE4', 'PRKCG',
           'RREB1')

# name = Ensembl-v instead of markMSN3
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markEx, embedding = "UMAPH230", imputeWeights = NULL)

p_ex <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
#do.call(cowplot::plot_grid, c(list(ncol = 3),p3))
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-1a8648d02bac-Date-2022-04-10_Time-12-33-09.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-10 12:33:10 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-1a8648d02bac-Date-2022-04-10_Time-12-33-09.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
In [9]:
do.call(cowplot::plot_grid, c(list(ncol = 3),p_ex))

Inhibitory Neurons¶

In [10]:
### Inhibitory neurons
markInh = c('CDH3','RORB','ADAMTS5','NPY', 'PDYN')

# name = Ensembl-v instead of markMSN3
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markInh, embedding = "UMAPH230", imputeWeights = NULL)

p_inh <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-1a86474ec80f4-Date-2022-04-10_Time-12-34-47.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-10 12:34:48 : 



Plotting Embedding

1 
2 
3 
4 
5 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-1a86474ec80f4-Date-2022-04-10_Time-12-34-47.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
In [11]:
do.call(cowplot::plot_grid, c(list(ncol = 3),p_inh))

disregard for now¶

In [19]:
###### Dorsal Horn Atlas Nature Neuro Marker Genes
###### NN: Nature Neuro
###### Inhibitory

markInh_NN = c('SLC32A1', # GABA transporter Vgat
               'GAD1',
               'GAD2')

markerGenePlot(proj, markInh_NN)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-66d6b75db516f-Date-2022-04-07_Time-13-05-15.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-07 13:05:15 : 



Plotting Embedding

1 
2 
3 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-66d6b75db516f-Date-2022-04-07_Time-13-05-15.log

In [20]:
###### Dorsal Horn Atlas Nature Neuro Marker Genes
###### NN: Nature Neuro
###### Excitatory
options(repr.plot.width=11, repr.plot.height=8.5)
genes[startsWith(genes,'Cacnad1')]

#not found: 'CACNAD1'
markEx_NN = c('SLC17A6',# Glu transporter Vglu2
             'NRN1'
              )
markerGenePlot(proj, markEx_NN)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-66d6b7dbd2d43-Date-2022-04-07_Time-13-05-55.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-07 13:05:55 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-66d6b7dbd2d43-Date-2022-04-07_Time-13-05-55.log

In [21]:
###### Dorsal Horn Atlas Nature Neuro Marker Genes
###### NN: Nature Neuro
###### Excitatory
options(repr.plot.width=11, repr.plot.height=40)

#### DETAILED CELL TYPES
genes[startsWith(genes,'Cacnad1')]

#not found: NFATC1,ECI3,TAC2
markEx_NN_fig1b = c('SLC17A6', 'CRABP1', 'SPP1', 'SH3BGR', 'HTR1A' ,'KRT25', 'RXFP2', 'EYA2', 'TAC1', 
'CHRM3','ACAP1', 'BMP7','SPON1' ,'QRFPR', 'CDH9', 'DUSP12', 
'LGALS9', 'GAL', 'PNOC', 'TSEN54','TACR1', 'CRH', 
'LMO4', 'NTNG1', 'NEFM', 'GDA', 'ADRA2A', 'LMO3',
'GPR101', 'RELN', 'COL11A1', 'NMUR2', 'NMU', 'PTHLH',
'UCN3', 'CBLN2', 'CPNE4', 'PLCH2', 'CLDN1')

markerGenePlot(proj, markEx_NN_fig1b)
options(repr.plot.width=11, repr.plot.height=8.5)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-66d6b47f103bd-Date-2022-04-07_Time-13-06-06.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-07 13:06:07 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-66d6b47f103bd-Date-2022-04-07_Time-13-06-06.log

In [22]:
################### Inhibitory - detailed
#### Not found: '2010001M06RIK', 'C530044C16RIK', 'GM20754', 'GM2694'

markInh_NN_fig1b = c('SLC32A1', 'HTR3A' ,'AQP6','SEMA3E' ,'SLC30A3','TfAP2B','NR2F2', 
'GPC5','ID2','ADAMTS5', 'FRZB','CHRDL1','KRT17',
'NPY','TRHR','ECEL1',
'ADAMTSL2','PDYN','SSTR1','CRYM','HLCS' ,
'LYPD1','POU4F1' ,'MEIS2' ,'GRPR','COL5A2','MYO5B',
'CBLN4','BDNF','SOSTDC1' ,'NPFF' ,
'SMOC2' ,'GRP','LRRC38' ,'NTS' ,'TRH','CCK',
'MAF','NRN1')

options(repr.plot.width=11, repr.plot.height=40)
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markInh_NN_fig1b, embedding = "UMAPH230", imputeWeights = NULL)

p3 <- lapply(p, function(x){
  x + guides(color = "none", fill = "none") + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
do.call(cowplot::plot_grid, c(list(ncol = 3),p3))
options(repr.plot.width=11, repr.plot.height=8.5)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-66d6b7cd4aa6c-Date-2022-04-07_Time-13-07-47.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-07 13:07:48 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-66d6b7cd4aa6c-Date-2022-04-07_Time-13-07-47.log

Astrocytes¶

In [8]:
##### Astrocyte 1 & 2 - based on Michael's rna-seq figure

markAstro1 = c('GFAP', 'GFAP') # not found: 'TGB4'
markAstro2 = c('SLC7A10', 'TRPM3', 'PDZRN4', 'MFGE8')
In [9]:
markerGenePlot(proj, markAstro1)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba38bd41cd-Date-2022-04-11_Time-12-28-19.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:28:20 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba38bd41cd-Date-2022-04-11_Time-12-28-19.log

In [10]:
markerGenePlot(proj, markAstro2)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba549e4a40-Date-2022-04-11_Time-12-28-33.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:28:34 : 



Plotting Embedding

1 
2 
3 
4 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba549e4a40-Date-2022-04-11_Time-12-28-33.log

Ependymal¶

In [11]:
##### Ependymal- - based on Michael's rna-seq figure
markEpendymal = c('RFX2', 'DNAH12')
markerGenePlot(proj, markEpendymal)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba3acde93c-Date-2022-04-11_Time-12-28-52.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:28:53 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba3acde93c-Date-2022-04-11_Time-12-28-52.log

Meninges¶

In [12]:
##### Meninges- - based on Michael's rna-seq figure
markMeninges = c('LAMA2', 'BICC1')
markerGenePlot(proj, markMeninges)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba4f6a3e81-Date-2022-04-11_Time-12-29-03.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:29:04 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba4f6a3e81-Date-2022-04-11_Time-12-29-03.log

In [13]:
##### Meninges- - based on search
#### https://www.biorxiv.org/content/10.1101/648642v1.full.pdf
markMeninges_search = c('FOXC1', 'S100A6', 'CRABP2', 'CRYM')
markerGenePlot(proj, markMeninges_search)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba6239459a-Date-2022-04-11_Time-12-29-14.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:29:15 : 



Plotting Embedding

1 
2 
3 
4 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba6239459a-Date-2022-04-11_Time-12-29-14.log

Microglia¶

In [14]:
##### microglia - - based on Michael's rna-seq figure
markMicroglia = c('MYO1F', 'PALD1')
markerGenePlot(proj, markMicroglia)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba5300c50-Date-2022-04-11_Time-12-29-33.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:29:34 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba5300c50-Date-2022-04-11_Time-12-29-33.log

Neurons¶

In [15]:
##### Neurons - - based on Michael's rna-seq figure
markNeurons = c('SRRM3', 'MYT1L', 'RBFOX3')
markerGenePlot(proj, markNeurons)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba2894cd6c-Date-2022-04-11_Time-12-29-44.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:29:45 : 



Plotting Embedding

1 
2 
3 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba2894cd6c-Date-2022-04-11_Time-12-29-44.log

OPCs¶

In [16]:
##### OPCs - - based on Michael's rna-seq figure
markOPCs = c('MEGF11', 'UST', 'TNR')
# from BaDoi: PDGFA (transcription factor)
markerGenePlot(proj, markOPCs)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba37117c9a-Date-2022-04-11_Time-12-30-00.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:30:00 : 



Plotting Embedding

1 
2 
3 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba37117c9a-Date-2022-04-11_Time-12-30-00.log

Oligos¶

In [17]:
##### Oligos 1 and 2 - - based on Michael's rna-seq figure
markOligo1 = c('QDPR', 'QDPR')
markerGenePlot(proj, markOligo1)

#From Badoi : MOG
#MAG
#MBP
markOligo_BaDoi = c('MAG', 'MBP')
markerGenePlot(proj, markOligo_BaDoi)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba622fa902-Date-2022-04-11_Time-12-30-21.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:30:22 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba622fa902-Date-2022-04-11_Time-12-30-21.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba471976a9-Date-2022-04-11_Time-12-30-28.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:30:29 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba471976a9-Date-2022-04-11_Time-12-30-28.log

In [18]:
markOligo2 = c('DPY19L1', 'DPY19L1') # not found: 'S100B'
markerGenePlot(proj, markOligo2)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2baa32904c-Date-2022-04-11_Time-12-30-38.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:30:38 : 



Plotting Embedding

1 
2 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2baa32904c-Date-2022-04-11_Time-12-30-38.log

Schwann¶

In [19]:
markSchwann = c('UST', 'MPZ', 'PMP22')
markerGenePlot(proj, markSchwann)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba294f8b23-Date-2022-04-11_Time-12-30-46.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:30:46 : 



Plotting Embedding

1 
2 
3 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba294f8b23-Date-2022-04-11_Time-12-30-46.log

In [20]:
# from https://www.abcam.com/neuroscience/schwann-cell-markers-and-functions
# DNM2: https://elifesciences.org/articles/42404
# sox2: https://pubmed.ncbi.nlm.nih.gov/25859851/
markSchwann_search = c('SOX10', 'SOX2','MBP', 'DNM2')
markerGenePlot(proj, markSchwann_search)
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba3dc18ee9-Date-2022-04-11_Time-12-31-08.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-04-11 12:31:08 : 



Plotting Embedding

1 
2 
3 
4 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba3dc18ee9-Date-2022-04-11_Time-12-31-08.log

In [23]:
### Initial labeling of cells

############################################
# using marker gene scores, give cluster names
remapClust <- c(
  'C1'='OPC',
  'C2'='Oligo',
  'C3'='Oligo',
  'C4'='Oligo',
  'C5'='Oligo',
  'C6'='Oligo',
  'C7'='Drop', # check with BaDoi
  'C8'='Astro',
  'C9'='Astro',  
  'C10'='Astro', 
  'C11'='UNK',  # check with BaDoi
  'C12'='Mening',
  'C13'='Mening',
  'C14'='Mening',
  'C15'='MICRO',
  'C16'='MICRO',
  'C17'='Drop', # check with BaDoi
  'C18'='UNK',   # check with BaDoi
  'C19'='NEUR',
  'C20'='NEUR',
  'C21'='NEUR',
  'C22'='NEUR',
  'C23'='NEUR',
  'C24'='NEUR',
  'C25'='NEUR'
)

proj$Celltype1 <- mapLabels(proj$ClustersH230, newLabels = remapClust, 
                            oldLabels = names(remapClust))
table(proj$Celltype1)
 Astro   Drop Mening  MICRO   NEUR  Oligo    OPC    UNK 
  8983   1087   1925   6372   3819  19159   2088    396 
In [24]:
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "Celltype1", embedding = "UMAPH230")
p1
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-2d2ba68d1bba0-Date-2022-04-11_Time-12-34-20.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 
WARNING: Error found with Cairo installation. Continuing without rasterization.



ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-2d2ba68d1bba0-Date-2022-04-11_Time-12-34-20.log

Later¶

In [25]:
# drop the drop clusters, pull out the neuron cell types
ARCHDIR2=file.path(PROJDIR,'ArchR_Seal001_NEUR')
idxSample <- BiocGenerics::which(proj$Celltype1 %in% "NEUR")
table(proj$Celltype1[idxSample])
cellsSample <- proj$cellNames[idxSample]

proj2 = subsetArchRProject(
    ArchRProj = proj, 
    cells = cellsSample,
    outputDirectory = ARCHDIR2, 
    force = TRUE
)
NEUR 
3819 
Copying ArchRProject to new outputDirectory : /projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_NEUR

Copying Arrow Files...

Getting ImputeWeights

No imputeWeights found, returning NULL

Copying Other Files...

Copying Other Files (1 of 7): Embeddings

Copying Other Files (2 of 7): IterativeLSI110

Copying Other Files (3 of 7): IterativeLSI150

Copying Other Files (4 of 7): IterativeLSI190

Copying Other Files (5 of 7): IterativeLSI230

Copying Other Files (6 of 7): IterativeLSI30

Copying Other Files (7 of 7): IterativeLSI70

Saving ArchRProject...

Loading ArchRProject...

Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

In [26]:
# drop the drop clusters, pull out the glia cell types
ARCHDIR2=file.path(PROJDIR,'ArchR_Seal001_Other')
idxSample <- BiocGenerics::which(proj$Celltype1 %ni% c('NEUR', 'Drop'))
table(proj$Celltype1[idxSample])
cellsSample <- proj$cellNames[idxSample]

proj2 = subsetArchRProject(
    ArchRProj = proj,
    cells = cellsSample,
    outputDirectory = ARCHDIR2, 
    force = TRUE
)
 Astro Mening  MICRO  Oligo    OPC    UNK 
  8983   1925   6372  19159   2088    396 
Copying ArchRProject to new outputDirectory : /projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_Other

Copying Arrow Files...

Getting ImputeWeights

No imputeWeights found, returning NULL

Copying Other Files...

Copying Other Files (1 of 7): Embeddings

Copying Other Files (2 of 7): IterativeLSI110

Copying Other Files (3 of 7): IterativeLSI150

Copying Other Files (4 of 7): IterativeLSI190

Copying Other Files (5 of 7): IterativeLSI230

Copying Other Files (6 of 7): IterativeLSI30

Copying Other Files (7 of 7): IterativeLSI70

Saving ArchRProject...

Loading ArchRProject...

Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

In [27]:
proj = loadArchRProject(path = file.path(PROJDIR,'ArchR_Seal001_Other'))
proj
table(proj$Celltype1)
Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    


           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

class: ArchRProject 
outputDirectory: /projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_Other 
samples(5): DH-1_SEA1346A1 DH-3_SEA1346A3 DH-4_SEA1346A4 DH-5_SEA1346A5
  DH-2_SEA1346A2
sampleColData names(1): ArrowFiles
cellColData names(27): Sample TSSEnrichment ... ClustersH230 Celltype1
numberOfCells(1): 38923
medianTSS(1): 24.878
medianFrags(1): 11824
 Astro Mening  MICRO  Oligo    OPC    UNK 
  8983   1925   6372  19159   2088    396 
In [28]:
proj = loadArchRProject(path = file.path(PROJDIR,'ArchR_Seal001_NEUR'))
proj
Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    


           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

class: ArchRProject 
outputDirectory: /projects/pfenninggroup/singleCell/Macaque_SealDorsalHorn_snATAC-seq/data/tidy_data/ArchR_Seal001_NEUR 
samples(5): DH-1_SEA1346A1 DH-3_SEA1346A3 DH-4_SEA1346A4 DH-5_SEA1346A5
  DH-2_SEA1346A2
sampleColData names(1): ArrowFiles
cellColData names(27): Sample TSSEnrichment ... ClustersH230 Celltype1
numberOfCells(1): 3819
medianTSS(1): 19.259
medianFrags(1): 21271
In [ ]: